package com.iotechn.unimall.admin.api.examineAndApprove;

import com.dobbinsoft.fw.core.annotation.HttpMethod;
import com.dobbinsoft.fw.core.annotation.HttpOpenApi;
import com.dobbinsoft.fw.core.annotation.HttpParam;
import com.dobbinsoft.fw.core.annotation.HttpParamType;
import com.dobbinsoft.fw.core.annotation.param.NotNull;
import com.dobbinsoft.fw.core.annotation.param.TextFormat;
import com.dobbinsoft.fw.core.exception.ServiceException;
import com.dobbinsoft.fw.support.model.Page;
import com.iotechn.unimall.data.vo.ExamineAndApproveVO;

@HttpOpenApi(group = "admin.examineAndApprove", description = "入会审批")
public interface ExamineAndApproveService {

    @HttpMethod(description = "列表page", permission = "admin:examineAndApprove:page", permissionParentName = "入会审批", permissionName = "审批管理")
    public Page<ExamineAndApproveVO> page(
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "长度", valueDef = "20") Integer limit,
            @HttpParam(name = "status", type = HttpParamType.COMMON, description = "状态") Integer status,
            @HttpParam(name = "type", type = HttpParamType.COMMON, description = "类型") Integer type,
            @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "用户手机号") String phone,
            @HttpParam(name = "startTime", type = HttpParamType.COMMON, description = "开始时间") String startTime,
            @HttpParam(name = "endTime", type = HttpParamType.COMMON, description = "结束时间") String endTime,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId
    ) throws ServiceException;
    
    @HttpMethod(description = "更新", permission = "admin:examineAndApprove:page", permissionParentName = "入会审批", permissionName = "审批管理")
    public String update(
            @HttpParam(name = "id", type = HttpParamType.COMMON, description = "审批id") Long id,
            @HttpParam(name = "type", type = HttpParamType.COMMON, description = "审批类型（1-入会，2-解除）") Integer type,
            @HttpParam(name = "status", type = HttpParamType.COMMON, description = "审批状态（0-未通过，1-已通过，2-申请中）") Integer status,
            @HttpParam(name = "notPassCause", type = HttpParamType.COMMON, description = "未通过原因") String notPassCause,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId
    ) throws ServiceException;

}
